
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>odespy.problems &mdash; Odespy API 0.2 documentation</title>
    
    <link rel="stylesheet" href="_static/pyramid.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '0.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <link rel="top" title="Odespy API 0.2 documentation" href="index.html" />
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Neuton&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
<!--[if lte IE 6]>
<link rel="stylesheet" href="_static/ie6.css" type="text/css" media="screen" charset="utf-8" />
<![endif]-->

  </head>
  <body>

    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="np-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li><a href="index.html">Odespy API 0.2 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-odespy.problems">
<span id="odespy-problems"></span><h1><a class="reference internal" href="#module-odespy.problems" title="odespy.problems"><tt class="xref py py-mod docutils literal"><span class="pre">odespy.problems</span></tt></a><a class="headerlink" href="#module-odespy.problems" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="odespy.problems.ComplexOscillator">
<em class="property">class </em><tt class="descclassname">odespy.problems.</tt><tt class="descname">ComplexOscillator</tt><big>(</big><em>w=1, U0=[1, 0]</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#ComplexOscillator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.ComplexOscillator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#odespy.problems.Problem" title="odespy.problems.Problem"><tt class="xref py py-class docutils literal"><span class="pre">odespy.problems.Problem</span></tt></a></p>
<p>Harmonic oscillator (u&#8217;&#8217; + w*u = 0) expressed as a complex
ODE: u&#8217; = i*w*u.</p>
<p class="rubric">Methods</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#odespy.problems.ComplexOscillator.default_parameters" title="odespy.problems.ComplexOscillator.default_parameters"><tt class="xref py py-obj docutils literal"><span class="pre">default_parameters</span></tt></a>([resolution_per_period])</td>
<td></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.ComplexOscillator.f" title="odespy.problems.ComplexOscillator.f"><tt class="xref py py-obj docutils literal"><span class="pre">f</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">get_initial_condition</span></tt>()</td>
<td>Return vector of initial conditions.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.ComplexOscillator.jac" title="odespy.problems.ComplexOscillator.jac"><tt class="xref py py-obj docutils literal"><span class="pre">jac</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">terminate</span></tt>(u,&nbsp;t,&nbsp;step_number)</td>
<td>Default terminate function, always returning False.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.ComplexOscillator.u_exact" title="odespy.problems.ComplexOscillator.u_exact"><tt class="xref py py-obj docutils literal"><span class="pre">u_exact</span></tt></a>(t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">verify</span></tt>(u,&nbsp;t[,&nbsp;atol,&nbsp;rtol])</td>
<td>Return True if u at time points t coincides with an exact</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="odespy.problems.ComplexOscillator.__init__">
<tt class="descname">__init__</tt><big>(</big><em>w=1, U0=[1, 0]</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#ComplexOscillator.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.ComplexOscillator.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.ComplexOscillator.__module__">
<tt class="descname">__module__</tt><em class="property"> = 'odespy.problems'</em><a class="headerlink" href="#odespy.problems.ComplexOscillator.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.ComplexOscillator.default_parameters">
<tt class="descname">default_parameters</tt><big>(</big><em>resolution_per_period=20</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#ComplexOscillator.default_parameters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.ComplexOscillator.default_parameters" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.ComplexOscillator.f">
<tt class="descname">f</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#ComplexOscillator.f"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.ComplexOscillator.f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.ComplexOscillator.jac">
<tt class="descname">jac</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#ComplexOscillator.jac"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.ComplexOscillator.jac" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.ComplexOscillator.short_description">
<tt class="descname">short_description</tt><em class="property"> = &quot;Complex oscillator: u' = i*w*u&quot;</em><a class="headerlink" href="#odespy.problems.ComplexOscillator.short_description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.ComplexOscillator.u_exact">
<tt class="descname">u_exact</tt><big>(</big><em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#ComplexOscillator.u_exact"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.ComplexOscillator.u_exact" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="odespy.problems.Exponential">
<em class="property">class </em><tt class="descclassname">odespy.problems.</tt><tt class="descname">Exponential</tt><big>(</big><em>a=1</em>, <em>b=0</em>, <em>A=1</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Exponential"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Exponential" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#odespy.problems.Problem" title="odespy.problems.Problem"><tt class="xref py py-class docutils literal"><span class="pre">odespy.problems.Problem</span></tt></a></p>
<p class="rubric">Methods</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#odespy.problems.Exponential.default_parameters" title="odespy.problems.Exponential.default_parameters"><tt class="xref py py-obj docutils literal"><span class="pre">default_parameters</span></tt></a>()</td>
<td></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Exponential.f" title="odespy.problems.Exponential.f"><tt class="xref py py-obj docutils literal"><span class="pre">f</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#odespy.problems.Exponential.f_with_args" title="odespy.problems.Exponential.f_with_args"><tt class="xref py py-obj docutils literal"><span class="pre">f_with_args</span></tt></a>(u,&nbsp;t,&nbsp;a,&nbsp;b)</td>
<td></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Exponential.f_with_kwargs" title="odespy.problems.Exponential.f_with_kwargs"><tt class="xref py py-obj docutils literal"><span class="pre">f_with_kwargs</span></tt></a>(u,&nbsp;t[,&nbsp;a,&nbsp;b])</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">get_initial_condition</span></tt>()</td>
<td>Return vector of initial conditions.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Exponential.jac" title="odespy.problems.Exponential.jac"><tt class="xref py py-obj docutils literal"><span class="pre">jac</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#odespy.problems.Exponential.jac_with_args" title="odespy.problems.Exponential.jac_with_args"><tt class="xref py py-obj docutils literal"><span class="pre">jac_with_args</span></tt></a>(u,&nbsp;t,&nbsp;a,&nbsp;b)</td>
<td></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Exponential.jac_with_kwargs" title="odespy.problems.Exponential.jac_with_kwargs"><tt class="xref py py-obj docutils literal"><span class="pre">jac_with_kwargs</span></tt></a>(u,&nbsp;t[,&nbsp;a,&nbsp;b])</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">terminate</span></tt>(u,&nbsp;t,&nbsp;step_number)</td>
<td>Default terminate function, always returning False.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Exponential.u_exact" title="odespy.problems.Exponential.u_exact"><tt class="xref py py-obj docutils literal"><span class="pre">u_exact</span></tt></a>(t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">verify</span></tt>(u,&nbsp;t[,&nbsp;atol,&nbsp;rtol])</td>
<td>Return True if u at time points t coincides with an exact</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="odespy.problems.Exponential.__init__">
<tt class="descname">__init__</tt><big>(</big><em>a=1</em>, <em>b=0</em>, <em>A=1</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Exponential.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Exponential.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.Exponential.__module__">
<tt class="descname">__module__</tt><em class="property"> = 'odespy.problems'</em><a class="headerlink" href="#odespy.problems.Exponential.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Exponential.default_parameters">
<tt class="descname">default_parameters</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Exponential.default_parameters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Exponential.default_parameters" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Exponential.f">
<tt class="descname">f</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Exponential.f"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Exponential.f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Exponential.f_with_args">
<tt class="descname">f_with_args</tt><big>(</big><em>u</em>, <em>t</em>, <em>a</em>, <em>b</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Exponential.f_with_args"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Exponential.f_with_args" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Exponential.f_with_kwargs">
<tt class="descname">f_with_kwargs</tt><big>(</big><em>u</em>, <em>t</em>, <em>a=1</em>, <em>b=0</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Exponential.f_with_kwargs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Exponential.f_with_kwargs" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Exponential.jac">
<tt class="descname">jac</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Exponential.jac"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Exponential.jac" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Exponential.jac_with_args">
<tt class="descname">jac_with_args</tt><big>(</big><em>u</em>, <em>t</em>, <em>a</em>, <em>b</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Exponential.jac_with_args"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Exponential.jac_with_args" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Exponential.jac_with_kwargs">
<tt class="descname">jac_with_kwargs</tt><big>(</big><em>u</em>, <em>t</em>, <em>a=1</em>, <em>b=0</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Exponential.jac_with_kwargs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Exponential.jac_with_kwargs" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.Exponential.short_description">
<tt class="descname">short_description</tt><em class="property"> = &quot;Exponential solution: u' = a*u + b, u(0)=A&quot;</em><a class="headerlink" href="#odespy.problems.Exponential.short_description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Exponential.u_exact">
<tt class="descname">u_exact</tt><big>(</big><em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Exponential.u_exact"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Exponential.u_exact" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="odespy.problems.Gaussian0">
<em class="property">class </em><tt class="descclassname">odespy.problems.</tt><tt class="descname">Gaussian0</tt><big>(</big><em>c=2.0</em>, <em>s=1.0</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Gaussian0"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Gaussian0" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#odespy.problems.Problem" title="odespy.problems.Problem"><tt class="xref py py-class docutils literal"><span class="pre">odespy.problems.Problem</span></tt></a></p>
<p class="rubric">Methods</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">default_parameters</span></tt>()</td>
<td>Compute suitable time_points, atol/rtol, etc.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Gaussian0.f" title="odespy.problems.Gaussian0.f"><tt class="xref py py-obj docutils literal"><span class="pre">f</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">get_initial_condition</span></tt>()</td>
<td>Return vector of initial conditions.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Gaussian0.jac" title="odespy.problems.Gaussian0.jac"><tt class="xref py py-obj docutils literal"><span class="pre">jac</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">terminate</span></tt>(u,&nbsp;t,&nbsp;step_number)</td>
<td>Default terminate function, always returning False.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Gaussian0.u_exact" title="odespy.problems.Gaussian0.u_exact"><tt class="xref py py-obj docutils literal"><span class="pre">u_exact</span></tt></a>(t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">verify</span></tt>(u,&nbsp;t[,&nbsp;atol,&nbsp;rtol])</td>
<td>Return True if u at time points t coincides with an exact</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="odespy.problems.Gaussian0.__init__">
<tt class="descname">__init__</tt><big>(</big><em>c=2.0</em>, <em>s=1.0</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Gaussian0.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Gaussian0.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.Gaussian0.__module__">
<tt class="descname">__module__</tt><em class="property"> = 'odespy.problems'</em><a class="headerlink" href="#odespy.problems.Gaussian0.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Gaussian0.f">
<tt class="descname">f</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Gaussian0.f"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Gaussian0.f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Gaussian0.jac">
<tt class="descname">jac</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Gaussian0.jac"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Gaussian0.jac" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.Gaussian0.short_description">
<tt class="descname">short_description</tt><em class="property"> = 'Gaussian function as solution'</em><a class="headerlink" href="#odespy.problems.Gaussian0.short_description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Gaussian0.u_exact">
<tt class="descname">u_exact</tt><big>(</big><em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Gaussian0.u_exact"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Gaussian0.u_exact" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="odespy.problems.Gaussian1">
<em class="property">class </em><tt class="descclassname">odespy.problems.</tt><tt class="descname">Gaussian1</tt><big>(</big><em>c=2.0</em>, <em>s=1.0</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Gaussian1"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Gaussian1" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#odespy.problems.Problem" title="odespy.problems.Problem"><tt class="xref py py-class docutils literal"><span class="pre">odespy.problems.Problem</span></tt></a></p>
<p class="rubric">Methods</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">default_parameters</span></tt>()</td>
<td>Compute suitable time_points, atol/rtol, etc.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Gaussian1.f" title="odespy.problems.Gaussian1.f"><tt class="xref py py-obj docutils literal"><span class="pre">f</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">get_initial_condition</span></tt>()</td>
<td>Return vector of initial conditions.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Gaussian1.jac" title="odespy.problems.Gaussian1.jac"><tt class="xref py py-obj docutils literal"><span class="pre">jac</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">terminate</span></tt>(u,&nbsp;t,&nbsp;step_number)</td>
<td>Default terminate function, always returning False.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Gaussian1.u_exact" title="odespy.problems.Gaussian1.u_exact"><tt class="xref py py-obj docutils literal"><span class="pre">u_exact</span></tt></a>(t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">verify</span></tt>(u,&nbsp;t[,&nbsp;atol,&nbsp;rtol])</td>
<td>Return True if u at time points t coincides with an exact</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="odespy.problems.Gaussian1.__init__">
<tt class="descname">__init__</tt><big>(</big><em>c=2.0</em>, <em>s=1.0</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Gaussian1.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Gaussian1.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.Gaussian1.__module__">
<tt class="descname">__module__</tt><em class="property"> = 'odespy.problems'</em><a class="headerlink" href="#odespy.problems.Gaussian1.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Gaussian1.f">
<tt class="descname">f</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Gaussian1.f"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Gaussian1.f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Gaussian1.jac">
<tt class="descname">jac</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Gaussian1.jac"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Gaussian1.jac" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.Gaussian1.short_description">
<tt class="descname">short_description</tt><em class="property"> = '1 + Gaussian function as solution'</em><a class="headerlink" href="#odespy.problems.Gaussian1.short_description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Gaussian1.u_exact">
<tt class="descname">u_exact</tt><big>(</big><em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Gaussian1.u_exact"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Gaussian1.u_exact" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="odespy.problems.Linear1">
<em class="property">class </em><tt class="descclassname">odespy.problems.</tt><tt class="descname">Linear1</tt><big>(</big><em>a=1</em>, <em>b=0</em>, <em>c=2</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Linear1"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Linear1" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#odespy.problems.Problem" title="odespy.problems.Problem"><tt class="xref py py-class docutils literal"><span class="pre">odespy.problems.Problem</span></tt></a></p>
<p>Linear solution of a nonlinear ODE,
which is normally exactly reproduced by a numerical method.</p>
<p class="rubric">Methods</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#odespy.problems.Linear1.default_parameters" title="odespy.problems.Linear1.default_parameters"><tt class="xref py py-obj docutils literal"><span class="pre">default_parameters</span></tt></a>()</td>
<td></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Linear1.f" title="odespy.problems.Linear1.f"><tt class="xref py py-obj docutils literal"><span class="pre">f</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">get_initial_condition</span></tt>()</td>
<td>Return vector of initial conditions.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Linear1.jac" title="odespy.problems.Linear1.jac"><tt class="xref py py-obj docutils literal"><span class="pre">jac</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">terminate</span></tt>(u,&nbsp;t,&nbsp;step_number)</td>
<td>Default terminate function, always returning False.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Linear1.u_exact" title="odespy.problems.Linear1.u_exact"><tt class="xref py py-obj docutils literal"><span class="pre">u_exact</span></tt></a>(t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">verify</span></tt>(u,&nbsp;t[,&nbsp;atol,&nbsp;rtol])</td>
<td>Return True if u at time points t coincides with an exact</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="odespy.problems.Linear1.__init__">
<tt class="descname">__init__</tt><big>(</big><em>a=1</em>, <em>b=0</em>, <em>c=2</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Linear1.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Linear1.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.Linear1.__module__">
<tt class="descname">__module__</tt><em class="property"> = 'odespy.problems'</em><a class="headerlink" href="#odespy.problems.Linear1.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Linear1.default_parameters">
<tt class="descname">default_parameters</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Linear1.default_parameters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Linear1.default_parameters" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Linear1.f">
<tt class="descname">f</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Linear1.f"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Linear1.f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Linear1.jac">
<tt class="descname">jac</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Linear1.jac"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Linear1.jac" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.Linear1.short_description">
<tt class="descname">short_description</tt><em class="property"> = &quot;u' = a + (u - a*t - b)**c, u(0)=b&quot;</em><a class="headerlink" href="#odespy.problems.Linear1.short_description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Linear1.u_exact">
<tt class="descname">u_exact</tt><big>(</big><em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Linear1.u_exact"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Linear1.u_exact" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="odespy.problems.Linear2">
<em class="property">class </em><tt class="descclassname">odespy.problems.</tt><tt class="descname">Linear2</tt><big>(</big><em>a=1</em>, <em>b=0</em>, <em>c=2</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Linear2"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Linear2" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#odespy.problems.Linear1" title="odespy.problems.Linear1"><tt class="xref py py-class docutils literal"><span class="pre">odespy.problems.Linear1</span></tt></a></p>
<p>Linear solution of nonlinear 2x2 system,
which is normally exactly reproduced by a numerical method.</p>
<p class="rubric">Methods</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">default_parameters</span></tt>()</td>
<td></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Linear2.f" title="odespy.problems.Linear2.f"><tt class="xref py py-obj docutils literal"><span class="pre">f</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">get_initial_condition</span></tt>()</td>
<td>Return vector of initial conditions.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Linear2.jac" title="odespy.problems.Linear2.jac"><tt class="xref py py-obj docutils literal"><span class="pre">jac</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#odespy.problems.Linear2.spcrad" title="odespy.problems.Linear2.spcrad"><tt class="xref py py-obj docutils literal"><span class="pre">spcrad</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-even"><td><tt class="xref py py-obj docutils literal"><span class="pre">terminate</span></tt>(u,&nbsp;t,&nbsp;step_number)</td>
<td>Default terminate function, always returning False.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#odespy.problems.Linear2.u_exact" title="odespy.problems.Linear2.u_exact"><tt class="xref py py-obj docutils literal"><span class="pre">u_exact</span></tt></a>(t)</td>
<td></td>
</tr>
<tr class="row-even"><td><tt class="xref py py-obj docutils literal"><span class="pre">verify</span></tt>(u,&nbsp;t[,&nbsp;atol,&nbsp;rtol])</td>
<td>Return True if u at time points t coincides with an exact</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="odespy.problems.Linear2.__init__">
<tt class="descname">__init__</tt><big>(</big><em>a=1</em>, <em>b=0</em>, <em>c=2</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Linear2.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Linear2.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.Linear2.__module__">
<tt class="descname">__module__</tt><em class="property"> = 'odespy.problems'</em><a class="headerlink" href="#odespy.problems.Linear2.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Linear2.f">
<tt class="descname">f</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Linear2.f"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Linear2.f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Linear2.jac">
<tt class="descname">jac</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Linear2.jac"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Linear2.jac" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.Linear2.short_description">
<tt class="descname">short_description</tt><em class="property"> = '2x2 nonlinear system with linear solution'</em><a class="headerlink" href="#odespy.problems.Linear2.short_description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Linear2.spcrad">
<tt class="descname">spcrad</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Linear2.spcrad"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Linear2.spcrad" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Linear2.u_exact">
<tt class="descname">u_exact</tt><big>(</big><em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Linear2.u_exact"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Linear2.u_exact" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="odespy.problems.Linear2t">
<em class="property">class </em><tt class="descclassname">odespy.problems.</tt><tt class="descname">Linear2t</tt><big>(</big><em>a=1</em>, <em>b=0</em>, <em>c=2</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Linear2t"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Linear2t" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#odespy.problems.Linear2" title="odespy.problems.Linear2"><tt class="xref py py-class docutils literal"><span class="pre">odespy.problems.Linear2</span></tt></a></p>
<p>Linear solution of trivial 2x2 system,
which is normally exactly reproduced by a numerical method.</p>
<p class="rubric">Methods</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">default_parameters</span></tt>()</td>
<td></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Linear2t.f" title="odespy.problems.Linear2t.f"><tt class="xref py py-obj docutils literal"><span class="pre">f</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">get_initial_condition</span></tt>()</td>
<td>Return vector of initial conditions.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Linear2t.jac" title="odespy.problems.Linear2t.jac"><tt class="xref py py-obj docutils literal"><span class="pre">jac</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#odespy.problems.Linear2t.spcrad" title="odespy.problems.Linear2t.spcrad"><tt class="xref py py-obj docutils literal"><span class="pre">spcrad</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-even"><td><tt class="xref py py-obj docutils literal"><span class="pre">terminate</span></tt>(u,&nbsp;t,&nbsp;step_number)</td>
<td>Default terminate function, always returning False.</td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">u_exact</span></tt>(t)</td>
<td></td>
</tr>
<tr class="row-even"><td><tt class="xref py py-obj docutils literal"><span class="pre">verify</span></tt>(u,&nbsp;t[,&nbsp;atol,&nbsp;rtol])</td>
<td>Return True if u at time points t coincides with an exact</td>
</tr>
</tbody>
</table>
<dl class="attribute">
<dt id="odespy.problems.Linear2t.__module__">
<tt class="descname">__module__</tt><em class="property"> = 'odespy.problems'</em><a class="headerlink" href="#odespy.problems.Linear2t.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Linear2t.f">
<tt class="descname">f</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Linear2t.f"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Linear2t.f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Linear2t.jac">
<tt class="descname">jac</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Linear2t.jac"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Linear2t.jac" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.Linear2t.short_description">
<tt class="descname">short_description</tt><em class="property"> = '2x2 trivial system with linear solution'</em><a class="headerlink" href="#odespy.problems.Linear2t.short_description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Linear2t.spcrad">
<tt class="descname">spcrad</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Linear2t.spcrad"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Linear2t.spcrad" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="odespy.problems.LinearOscillator">
<em class="property">class </em><tt class="descclassname">odespy.problems.</tt><tt class="descname">LinearOscillator</tt><big>(</big><em>m=1</em>, <em>k=1</em>, <em>x0=1</em>, <em>v0=0</em>, <em>F=None</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#LinearOscillator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.LinearOscillator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#odespy.problems.Problem" title="odespy.problems.Problem"><tt class="xref py py-class docutils literal"><span class="pre">odespy.problems.Problem</span></tt></a></p>
<p class="rubric">Methods</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#odespy.problems.LinearOscillator.default_parameters" title="odespy.problems.LinearOscillator.default_parameters"><tt class="xref py py-obj docutils literal"><span class="pre">default_parameters</span></tt></a>([resolution_per_period])</td>
<td></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.LinearOscillator.f" title="odespy.problems.LinearOscillator.f"><tt class="xref py py-obj docutils literal"><span class="pre">f</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">get_initial_condition</span></tt>()</td>
<td>Return vector of initial conditions.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.LinearOscillator.jac" title="odespy.problems.LinearOscillator.jac"><tt class="xref py py-obj docutils literal"><span class="pre">jac</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#odespy.problems.LinearOscillator.kinetic_energy" title="odespy.problems.LinearOscillator.kinetic_energy"><tt class="xref py py-obj docutils literal"><span class="pre">kinetic_energy</span></tt></a>(u)</td>
<td></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.LinearOscillator.potential_energy" title="odespy.problems.LinearOscillator.potential_energy"><tt class="xref py py-obj docutils literal"><span class="pre">potential_energy</span></tt></a>(u)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">terminate</span></tt>(u,&nbsp;t,&nbsp;step_number)</td>
<td>Default terminate function, always returning False.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.LinearOscillator.u_exact" title="odespy.problems.LinearOscillator.u_exact"><tt class="xref py py-obj docutils literal"><span class="pre">u_exact</span></tt></a>(t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">verify</span></tt>(u,&nbsp;t[,&nbsp;atol,&nbsp;rtol])</td>
<td>Return True if u at time points t coincides with an exact</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="odespy.problems.LinearOscillator.__init__">
<tt class="descname">__init__</tt><big>(</big><em>m=1</em>, <em>k=1</em>, <em>x0=1</em>, <em>v0=0</em>, <em>F=None</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#LinearOscillator.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.LinearOscillator.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.LinearOscillator.__module__">
<tt class="descname">__module__</tt><em class="property"> = 'odespy.problems'</em><a class="headerlink" href="#odespy.problems.LinearOscillator.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.LinearOscillator.default_parameters">
<tt class="descname">default_parameters</tt><big>(</big><em>resolution_per_period=20</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#LinearOscillator.default_parameters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.LinearOscillator.default_parameters" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.LinearOscillator.f">
<tt class="descname">f</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#LinearOscillator.f"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.LinearOscillator.f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.LinearOscillator.jac">
<tt class="descname">jac</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#LinearOscillator.jac"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.LinearOscillator.jac" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.LinearOscillator.kinetic_energy">
<tt class="descname">kinetic_energy</tt><big>(</big><em>u</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#LinearOscillator.kinetic_energy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.LinearOscillator.kinetic_energy" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.LinearOscillator.potential_energy">
<tt class="descname">potential_energy</tt><big>(</big><em>u</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#LinearOscillator.potential_energy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.LinearOscillator.potential_energy" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.LinearOscillator.short_description">
<tt class="descname">short_description</tt><em class="property"> = &quot;Linear oscillator: m*u'' + k*u = F(t)&quot;</em><a class="headerlink" href="#odespy.problems.LinearOscillator.short_description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.LinearOscillator.u_exact">
<tt class="descname">u_exact</tt><big>(</big><em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#LinearOscillator.u_exact"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.LinearOscillator.u_exact" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="odespy.problems.Logistic">
<em class="property">class </em><tt class="descclassname">odespy.problems.</tt><tt class="descname">Logistic</tt><big>(</big><em>a</em>, <em>R</em>, <em>A</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Logistic"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Logistic" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#odespy.problems.Problem" title="odespy.problems.Problem"><tt class="xref py py-class docutils literal"><span class="pre">odespy.problems.Problem</span></tt></a></p>
<p class="rubric">Methods</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">default_parameters</span></tt>()</td>
<td>Compute suitable time_points, atol/rtol, etc.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Logistic.f" title="odespy.problems.Logistic.f"><tt class="xref py py-obj docutils literal"><span class="pre">f</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">get_initial_condition</span></tt>()</td>
<td>Return vector of initial conditions.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Logistic.jac" title="odespy.problems.Logistic.jac"><tt class="xref py py-obj docutils literal"><span class="pre">jac</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">terminate</span></tt>(u,&nbsp;t,&nbsp;step_number)</td>
<td>Default terminate function, always returning False.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Logistic.u_exact" title="odespy.problems.Logistic.u_exact"><tt class="xref py py-obj docutils literal"><span class="pre">u_exact</span></tt></a>(t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">verify</span></tt>(u,&nbsp;t[,&nbsp;atol,&nbsp;rtol])</td>
<td>Return True if u at time points t coincides with an exact</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="odespy.problems.Logistic.__init__">
<tt class="descname">__init__</tt><big>(</big><em>a</em>, <em>R</em>, <em>A</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Logistic.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Logistic.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.Logistic.__module__">
<tt class="descname">__module__</tt><em class="property"> = 'odespy.problems'</em><a class="headerlink" href="#odespy.problems.Logistic.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Logistic.f">
<tt class="descname">f</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Logistic.f"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Logistic.f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Logistic.jac">
<tt class="descname">jac</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Logistic.jac"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Logistic.jac" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.Logistic.short_description">
<tt class="descname">short_description</tt><em class="property"> = 'Logistic equation'</em><a class="headerlink" href="#odespy.problems.Logistic.short_description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Logistic.u_exact">
<tt class="descname">u_exact</tt><big>(</big><em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Logistic.u_exact"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Logistic.u_exact" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="odespy.problems.Problem">
<em class="property">class </em><tt class="descclassname">odespy.problems.</tt><tt class="descname">Problem</tt><a class="reference internal" href="_modules/odespy/problems.html#Problem"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Problem" title="Permalink to this definition">¶</a></dt>
<dd><p>The user derives a subclass and implements the right-hand side
function:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">f</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">u</span><span class="p">,</span> <span class="n">t</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Python function for the right-hand side of the ODE u&#39;=f(u,t).&quot;&quot;&quot;</span>
</pre></div>
</div>
<p>Optionally, the Jacobian can be computed:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">jac</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">u</span><span class="p">,</span> <span class="n">t</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Python function for the Jacobian of the right-hand side: df/du.&quot;&quot;&quot;</span>
</pre></div>
</div>
<p>Some solvers also allow constraings (DAE problems):</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">constraints</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">u</span><span class="p">,</span> <span class="n">t</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Python function for additional constraints: g(u,t)=0.&quot;&quot;&quot;</span>
</pre></div>
</div>
<p>Some problem classes will also define command-line arguments:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">define_command_line_arguments</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">parser</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Initialize an argparse object for reading command-line</span>
<span class="sd">    option-value pairs. `parser` is an ``argparse`` object.</span>
<span class="sd">    &quot;&quot;&quot;</span>
</pre></div>
</div>
<p>Other functions, for which there are default implementations
in the superclass, are <tt class="docutils literal"><span class="pre">u_exact</span></tt> for returning the exact
solution (if known), <tt class="docutils literal"><span class="pre">verify</span></tt> for checking that a numerical
solution is correct (within a tolerance of the analytical solution),</p>
<p>See the tutorial for examples on subclasses of <tt class="docutils literal"><span class="pre">Problem</span></tt>.</p>
<p class="rubric">Methods</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#odespy.problems.Problem.default_parameters" title="odespy.problems.Problem.default_parameters"><tt class="xref py py-obj docutils literal"><span class="pre">default_parameters</span></tt></a>()</td>
<td>Compute suitable time_points, atol/rtol, etc.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Problem.get_initial_condition" title="odespy.problems.Problem.get_initial_condition"><tt class="xref py py-obj docutils literal"><span class="pre">get_initial_condition</span></tt></a>()</td>
<td>Return vector of initial conditions.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#odespy.problems.Problem.terminate" title="odespy.problems.Problem.terminate"><tt class="xref py py-obj docutils literal"><span class="pre">terminate</span></tt></a>(u,&nbsp;t,&nbsp;step_number)</td>
<td>Default terminate function, always returning False.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.Problem.u_exact" title="odespy.problems.Problem.u_exact"><tt class="xref py py-obj docutils literal"><span class="pre">u_exact</span></tt></a>(t)</td>
<td>Implementation of the exact solution.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#odespy.problems.Problem.verify" title="odespy.problems.Problem.verify"><tt class="xref py py-obj docutils literal"><span class="pre">verify</span></tt></a>(u,&nbsp;t[,&nbsp;atol,&nbsp;rtol])</td>
<td>Return True if u at time points t coincides with an exact</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="odespy.problems.Problem.__contains__">
<tt class="descname">__contains__</tt><big>(</big><em>attr</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Problem.__contains__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Problem.__contains__" title="Permalink to this definition">¶</a></dt>
<dd><p>Return True if attr is a method in instance self.</p>
</dd></dl>

<dl class="method">
<dt id="odespy.problems.Problem.__init__">
<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Problem.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Problem.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.Problem.__module__">
<tt class="descname">__module__</tt><em class="property"> = 'odespy.problems'</em><a class="headerlink" href="#odespy.problems.Problem.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.Problem.complex_">
<tt class="descname">complex_</tt><em class="property"> = False</em><a class="headerlink" href="#odespy.problems.Problem.complex_" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Problem.default_parameters">
<tt class="descname">default_parameters</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Problem.default_parameters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Problem.default_parameters" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute suitable time_points, atol/rtol, etc. for the
particular problem. Useful for quick generation of test
cases, demos, unit tests, etc.</p>
</dd></dl>

<dl class="method">
<dt id="odespy.problems.Problem.get_initial_condition">
<tt class="descname">get_initial_condition</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Problem.get_initial_condition"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Problem.get_initial_condition" title="Permalink to this definition">¶</a></dt>
<dd><p>Return vector of initial conditions.
Not necessary to implement in subclass if the
initial condition is stored in self.U0
(this method then returns that condition).</p>
</dd></dl>

<dl class="attribute">
<dt id="odespy.problems.Problem.not_suitable_solvers">
<tt class="descname">not_suitable_solvers</tt><em class="property"> = []</em><a class="headerlink" href="#odespy.problems.Problem.not_suitable_solvers" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.Problem.short_description">
<tt class="descname">short_description</tt><em class="property"> = ''</em><a class="headerlink" href="#odespy.problems.Problem.short_description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.Problem.stiff">
<tt class="descname">stiff</tt><em class="property"> = False</em><a class="headerlink" href="#odespy.problems.Problem.stiff" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.Problem.terminate">
<tt class="descname">terminate</tt><big>(</big><em>u</em>, <em>t</em>, <em>step_number</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Problem.terminate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Problem.terminate" title="Permalink to this definition">¶</a></dt>
<dd><p>Default terminate function, always returning False.</p>
</dd></dl>

<dl class="method">
<dt id="odespy.problems.Problem.u_exact">
<tt class="descname">u_exact</tt><big>(</big><em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Problem.u_exact"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Problem.u_exact" title="Permalink to this definition">¶</a></dt>
<dd><p>Implementation of the exact solution.
Return None if no exact solution is available.</p>
</dd></dl>

<dl class="method">
<dt id="odespy.problems.Problem.verify">
<tt class="descname">verify</tt><big>(</big><em>u</em>, <em>t</em>, <em>atol=None</em>, <em>rtol=None</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#Problem.verify"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.Problem.verify" title="Permalink to this definition">¶</a></dt>
<dd><p>Return True if u at time points t coincides with an exact
solution within the prescribed tolerances. If one of the
tolerances is None, return max computed error (infinity norm).
Return None if the solution cannot be verified.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="odespy.problems.StiffSystem2x2">
<em class="property">class </em><tt class="descclassname">odespy.problems.</tt><tt class="descname">StiffSystem2x2</tt><big>(</big><em>eps=0.01</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#StiffSystem2x2"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.StiffSystem2x2" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#odespy.problems.Problem" title="odespy.problems.Problem"><tt class="xref py py-class docutils literal"><span class="pre">odespy.problems.Problem</span></tt></a></p>
<p class="rubric">Methods</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">default_parameters</span></tt>()</td>
<td>Compute suitable time_points, atol/rtol, etc.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.StiffSystem2x2.f" title="odespy.problems.StiffSystem2x2.f"><tt class="xref py py-obj docutils literal"><span class="pre">f</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">get_initial_condition</span></tt>()</td>
<td>Return vector of initial conditions.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.StiffSystem2x2.jac" title="odespy.problems.StiffSystem2x2.jac"><tt class="xref py py-obj docutils literal"><span class="pre">jac</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">terminate</span></tt>(u,&nbsp;t,&nbsp;step_number)</td>
<td>Default terminate function, always returning False.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.StiffSystem2x2.u_exact" title="odespy.problems.StiffSystem2x2.u_exact"><tt class="xref py py-obj docutils literal"><span class="pre">u_exact</span></tt></a>(t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">verify</span></tt>(u,&nbsp;t[,&nbsp;atol,&nbsp;rtol])</td>
<td>Return True if u at time points t coincides with an exact</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="odespy.problems.StiffSystem2x2.__init__">
<tt class="descname">__init__</tt><big>(</big><em>eps=0.01</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#StiffSystem2x2.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.StiffSystem2x2.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.StiffSystem2x2.__module__">
<tt class="descname">__module__</tt><em class="property"> = 'odespy.problems'</em><a class="headerlink" href="#odespy.problems.StiffSystem2x2.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.StiffSystem2x2.f">
<tt class="descname">f</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#StiffSystem2x2.f"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.StiffSystem2x2.f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.StiffSystem2x2.jac">
<tt class="descname">jac</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#StiffSystem2x2.jac"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.StiffSystem2x2.jac" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.StiffSystem2x2.short_description">
<tt class="descname">short_description</tt><em class="property"> = &quot;Potentially stiff 2x2 system u' = 1/eps*u&quot;</em><a class="headerlink" href="#odespy.problems.StiffSystem2x2.short_description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.StiffSystem2x2.stiff">
<tt class="descname">stiff</tt><em class="property"> = True</em><a class="headerlink" href="#odespy.problems.StiffSystem2x2.stiff" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.StiffSystem2x2.u_exact">
<tt class="descname">u_exact</tt><big>(</big><em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#StiffSystem2x2.u_exact"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.StiffSystem2x2.u_exact" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="odespy.problems.VanDerPolOscillator">
<em class="property">class </em><tt class="descclassname">odespy.problems.</tt><tt class="descname">VanDerPolOscillator</tt><big>(</big><em>U0=[2, 1], mu=3.0, f77=False</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#VanDerPolOscillator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.VanDerPolOscillator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#odespy.problems.Problem" title="odespy.problems.Problem"><tt class="xref py py-class docutils literal"><span class="pre">odespy.problems.Problem</span></tt></a></p>
<blockquote>
<div><p>Classical van der Pool oscillator:</p>
<div class="math">
\[y'' = \mu (1 - y^2) y' - y\]</div>
<p>with initial conditions <span class="math">\(y(0)=2, y'(0)=1\)</span>.
The equation is rewritten as a system</p>
<div class="math">
\[\begin{split}u_0' &amp;= u_1, \
u_1' &amp;= \mu (1-u_0^2)u_1 - u_0\end{split}\]</div>
<p>with a Jacobian</p>
<div class="math">
\[\begin{split}\left(egin{array}{cc}
0 &amp; 1\
-2\mu u_0 - 1 &amp; \mu (1-u_0^2)
\end{array}\end{split}\]</div>
</div></blockquote>
<p>ight)</p>
<p class="rubric">Methods</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#odespy.problems.VanDerPolOscillator.default_parameters" title="odespy.problems.VanDerPolOscillator.default_parameters"><tt class="xref py py-obj docutils literal"><span class="pre">default_parameters</span></tt></a>([resolution_per_period])</td>
<td></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.VanDerPolOscillator.f" title="odespy.problems.VanDerPolOscillator.f"><tt class="xref py py-obj docutils literal"><span class="pre">f</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#odespy.problems.VanDerPolOscillator.f_with_args" title="odespy.problems.VanDerPolOscillator.f_with_args"><tt class="xref py py-obj docutils literal"><span class="pre">f_with_args</span></tt></a>(u,&nbsp;t,&nbsp;mu)</td>
<td></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.VanDerPolOscillator.f_with_kwargs" title="odespy.problems.VanDerPolOscillator.f_with_kwargs"><tt class="xref py py-obj docutils literal"><span class="pre">f_with_kwargs</span></tt></a>(u,&nbsp;t[,&nbsp;mu])</td>
<td></td>
</tr>
<tr class="row-odd"><td><tt class="xref py py-obj docutils literal"><span class="pre">get_initial_condition</span></tt>()</td>
<td>Return vector of initial conditions.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.VanDerPolOscillator.jac" title="odespy.problems.VanDerPolOscillator.jac"><tt class="xref py py-obj docutils literal"><span class="pre">jac</span></tt></a>(u,&nbsp;t)</td>
<td></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#odespy.problems.VanDerPolOscillator.jac_with_args" title="odespy.problems.VanDerPolOscillator.jac_with_args"><tt class="xref py py-obj docutils literal"><span class="pre">jac_with_args</span></tt></a>(u,&nbsp;t,&nbsp;mu)</td>
<td></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.VanDerPolOscillator.jac_with_kwargs" title="odespy.problems.VanDerPolOscillator.jac_with_kwargs"><tt class="xref py py-obj docutils literal"><span class="pre">jac_with_kwargs</span></tt></a>(u,&nbsp;t[,&nbsp;mu])</td>
<td></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#odespy.problems.VanDerPolOscillator.str_f_f77" title="odespy.problems.VanDerPolOscillator.str_f_f77"><tt class="xref py py-obj docutils literal"><span class="pre">str_f_f77</span></tt></a>()</td>
<td>Return f(u,t) as Fortran source code string.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#odespy.problems.VanDerPolOscillator.str_jac_f77_fadau5" title="odespy.problems.VanDerPolOscillator.str_jac_f77_fadau5"><tt class="xref py py-obj docutils literal"><span class="pre">str_jac_f77_fadau5</span></tt></a>()</td>
<td>Return Jacobian Fortran source code string for Radau5.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#odespy.problems.VanDerPolOscillator.str_jac_f77_lsode_dense" title="odespy.problems.VanDerPolOscillator.str_jac_f77_lsode_dense"><tt class="xref py py-obj docutils literal"><span class="pre">str_jac_f77_lsode_dense</span></tt></a>()</td>
<td>Return Fortran source for dense Jacobian matrix in LSODE format.</td>
</tr>
<tr class="row-even"><td><tt class="xref py py-obj docutils literal"><span class="pre">terminate</span></tt>(u,&nbsp;t,&nbsp;step_number)</td>
<td>Default terminate function, always returning False.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#odespy.problems.VanDerPolOscillator.u_exact" title="odespy.problems.VanDerPolOscillator.u_exact"><tt class="xref py py-obj docutils literal"><span class="pre">u_exact</span></tt></a>(t)</td>
<td></td>
</tr>
<tr class="row-even"><td><tt class="xref py py-obj docutils literal"><span class="pre">verify</span></tt>(u,&nbsp;t[,&nbsp;atol,&nbsp;rtol])</td>
<td>Return True if u at time points t coincides with an exact</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="odespy.problems.VanDerPolOscillator.__init__">
<tt class="descname">__init__</tt><big>(</big><em>U0=[2, 1], mu=3.0, f77=False</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#VanDerPolOscillator.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.VanDerPolOscillator.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.VanDerPolOscillator.__module__">
<tt class="descname">__module__</tt><em class="property"> = 'odespy.problems'</em><a class="headerlink" href="#odespy.problems.VanDerPolOscillator.__module__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.VanDerPolOscillator.default_parameters">
<tt class="descname">default_parameters</tt><big>(</big><em>resolution_per_period=20</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#VanDerPolOscillator.default_parameters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.VanDerPolOscillator.default_parameters" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.VanDerPolOscillator.f">
<tt class="descname">f</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#VanDerPolOscillator.f"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.VanDerPolOscillator.f" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.VanDerPolOscillator.f_with_args">
<tt class="descname">f_with_args</tt><big>(</big><em>u</em>, <em>t</em>, <em>mu</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#VanDerPolOscillator.f_with_args"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.VanDerPolOscillator.f_with_args" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.VanDerPolOscillator.f_with_kwargs">
<tt class="descname">f_with_kwargs</tt><big>(</big><em>u</em>, <em>t</em>, <em>mu=3</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#VanDerPolOscillator.f_with_kwargs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.VanDerPolOscillator.f_with_kwargs" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.VanDerPolOscillator.jac">
<tt class="descname">jac</tt><big>(</big><em>u</em>, <em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#VanDerPolOscillator.jac"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.VanDerPolOscillator.jac" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.VanDerPolOscillator.jac_with_args">
<tt class="descname">jac_with_args</tt><big>(</big><em>u</em>, <em>t</em>, <em>mu</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#VanDerPolOscillator.jac_with_args"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.VanDerPolOscillator.jac_with_args" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.VanDerPolOscillator.jac_with_kwargs">
<tt class="descname">jac_with_kwargs</tt><big>(</big><em>u</em>, <em>t</em>, <em>mu=3</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#VanDerPolOscillator.jac_with_kwargs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.VanDerPolOscillator.jac_with_kwargs" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="odespy.problems.VanDerPolOscillator.short_description">
<tt class="descname">short_description</tt><em class="property"> = 'Van der Pol oscillator'</em><a class="headerlink" href="#odespy.problems.VanDerPolOscillator.short_description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="odespy.problems.VanDerPolOscillator.str_f_f77">
<tt class="descname">str_f_f77</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#VanDerPolOscillator.str_f_f77"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.VanDerPolOscillator.str_f_f77" title="Permalink to this definition">¶</a></dt>
<dd><p>Return f(u,t) as Fortran source code string.</p>
</dd></dl>

<dl class="method">
<dt id="odespy.problems.VanDerPolOscillator.str_jac_f77_fadau5">
<tt class="descname">str_jac_f77_fadau5</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#VanDerPolOscillator.str_jac_f77_fadau5"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.VanDerPolOscillator.str_jac_f77_fadau5" title="Permalink to this definition">¶</a></dt>
<dd><p>Return Jacobian Fortran source code string for Radau5.</p>
</dd></dl>

<dl class="method">
<dt id="odespy.problems.VanDerPolOscillator.str_jac_f77_lsode_dense">
<tt class="descname">str_jac_f77_lsode_dense</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#VanDerPolOscillator.str_jac_f77_lsode_dense"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.VanDerPolOscillator.str_jac_f77_lsode_dense" title="Permalink to this definition">¶</a></dt>
<dd><p>Return Fortran source for dense Jacobian matrix in LSODE format.</p>
</dd></dl>

<dl class="method">
<dt id="odespy.problems.VanDerPolOscillator.u_exact">
<tt class="descname">u_exact</tt><big>(</big><em>t</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#VanDerPolOscillator.u_exact"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.VanDerPolOscillator.u_exact" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="function">
<dt id="odespy.problems.convergence">
<tt class="descclassname">odespy.problems.</tt><tt class="descname">convergence</tt><big>(</big><em>u</em>, <em>t</em>, <em>u_ref=None</em>, <em>t_ref=None</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#convergence"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.convergence" title="Permalink to this definition">¶</a></dt>
<dd><p>Given a series of solutions and corresponding t arrays in
<cite>u</cite> and <cite>t</cite>, use the analytical solution or a reference solution
in <cite>u_ref</cite> and <cite>t_ref</cite> to compute errors. Compute pairwise
convergence rates for errors on consecutive time meshes.</p>
</dd></dl>

<dl class="function">
<dt id="odespy.problems.default_oscillator">
<tt class="descclassname">odespy.problems.</tt><tt class="descname">default_oscillator</tt><big>(</big><em>P</em>, <em>resolution_per_period=20</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#default_oscillator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.default_oscillator" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="odespy.problems.tester">
<tt class="descclassname">odespy.problems.</tt><tt class="descname">tester</tt><big>(</big><em>problems</em>, <em>methods</em>, <em>time_points=None</em>, <em>compare_tol=0.0001</em>, <em>solver_prm={}</em><big>)</big><a class="reference internal" href="_modules/odespy/problems.html#tester"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#odespy.problems.tester" title="Permalink to this definition">¶</a></dt>
<dd><p><cite>problems</cite> is a list of Problem subclass instances made ready.
<cite>methods</cite> is a list of strings holding the method names.</p>
</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="np-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li><a href="index.html">Odespy API 0.2 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2012, Liwei Wang and Hans Petter Langtangen.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
    </div>
  </body>
</html>